package com.weixing.mall.provider.api.service;

import com.weixing.mall.base.orm.MPage;
import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.provider.api.fallback.DeliveryAddressServiceFallback;
import com.weixing.mall.provider.api.model.vo.AgentMemberVo;
import com.weixing.mall.provider.api.model.vo.DeliveryAddressVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.ribbon.FeignRibbonClientAutoConfiguration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author wx
 * @Date 2019/12/16 13:40
 * @Version 1.0
 */
@FeignClient(value ="mall-provider-uac",configuration = FeignRibbonClientAutoConfiguration.class,fallback = DeliveryAddressServiceFallback.class)
public interface DeliveryAddressServiceRpc {
    @GetMapping("/api/deliveryAddress/getById")
    Result<DeliveryAddressVo> getById(@RequestParam(value = "addrId") Long addrId);


    @GetMapping("api/deliveryAddress/selectByAgentId")
    Result<MPage<DeliveryAddressVo>> selectByAgentId(@RequestParam(value = "agentId") long agentId,
                                                 @RequestParam(value = "currentPage") String currentPage,
                                                 @RequestParam(value = "pageSize") String pageSize);
}
